package top.bugger168.content.api;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import top.bugger168.content.model.dto.CoursePreviewDto;
import top.bugger168.content.service.CoursePublishService;

import javax.annotation.Resource;

/**
 * 为了配合前端而产生的接口类
 *
 * @author wanghaidong
 * @date 2023/08/28
 */
@RestController
public class OtherController {
    @Resource
    private CoursePublishService coursePublishService;

    @GetMapping("/course/whole/{courseId}")
    public CoursePreviewDto getPreviewInfo(@PathVariable("courseId") Long courseId) {
        //获取课程预览信息
        return coursePublishService.getCoursePreviewInfo(courseId);
    }
}
